package com.zmn.oms.persistence.interfaces.conf.distribute;

import com.zmn.common.dto.VtDTO;
import com.zmn.oms.model.entity.conf.distribute.DistributeWeightCompany;
import com.zmn.oms.model.entity.conf.distribute.DistributeWeightCompanyQuery;
import com.zmn.oms.model.entity.conf.distribute.DistributeWeightStatusQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 类描述：派单参数服务商配置数据处理接口
 *
 * @author mujunlin
 * @version v1.0
 * @since 2019/10/17 15:41
 */
@Repository
public interface DistributeWeightCompanyDao {

    DistributeWeightCompany findByKey(Integer weightId);

    List<DistributeWeightCompany> listPageByQuery(DistributeWeightCompanyQuery query);
    Integer listPageCountByQuery(DistributeWeightCompanyQuery query);

    /**
     * 根据公司ID查询有派单参数配置的公司下的城市
     *
     * @param companyId 公司ID
     * @param bizType
     * @return 城市信息集合
     */
    List<VtDTO> listCityByCompanyId(@Param("companyId") Integer companyId, @Param("bizType") Integer bizType);

    Integer countByQuery(DistributeWeightCompanyQuery query);

    Integer updateByKey(DistributeWeightCompany distributeWeightCompany);

    Integer updateStatusByQuery(DistributeWeightStatusQuery query);

    Integer insert(DistributeWeightCompany distributeWeightCompany);

    Integer deleteByKey(Integer weightId);

}
